package org.lightrpc;

public class RemoteCallFailedException extends Exception {

	private static final long serialVersionUID = 6312364563634891287L;

	public RemoteCallFailedException(String message, Throwable cause) {
		super(message, cause);
	}

	public RemoteCallFailedException(String message) {
		super(message);
	}

	public RemoteCallFailedException(RpcError error) {
		//TODO:wrapping of non interface exceptions should be made smarter
		super(error.getErrorName() +":"+error.getErrorMessage(), new Exception(error.getCause().getErrorMessage()));
	}
}
